﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="CountriesUpdate.aspx.cs" Inherits="CountriesUpdate" Title="Project Monitoring System"
    Culture="auto:en-US" UICulture="auto" meta:resourcekey="PageResource1" %>

<%@ Register Src="Buttons.ascx" TagName="Buttons" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
    Visible="false">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <asp:ObjectDataSource ID="ODSCountries" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetCountryData" TypeName="IPTableAdapters.CountryTableAdapter"
        UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_Country" Type="String" />
            <asp:Parameter Name="IsDelete" Type="Boolean" />
            <asp:Parameter Name="DeleteBy" Type="String" />
            <asp:Parameter Name="DeleteIP" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="EnglishName" Type="String" />
            <asp:Parameter Name="ChineseName" Type="String" />
            <asp:Parameter Name="UpdateBy" Type="String" />
            <asp:Parameter Name="PCTYN" Type="Boolean" />
            <asp:Parameter Name="Original_Country" Type="String" />
            <asp:Parameter Name="UpdateIP" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="EnglishName" Type="String" />
            <asp:Parameter Name="ChineseName" Type="String" />
            <asp:Parameter Name="PCTYN" Type="Boolean" />
            <asp:Parameter Name="CreateBy" Type="String" />
            <asp:Parameter Name="UpdateBy" Type="String" />
            <asp:Parameter Name="OwnerGroupID" Type="String" />
            <asp:Parameter Name="CreateIP" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <asp:Panel ID="SearchPanel" runat="server" HorizontalAlign="Center" Visible="false">
        <fieldset style="vertical-align: middle">
            <br />
            <table>
                <tr>
                    <td style="vertical-align: top; text-align: right">
                        <asp:Label ID="lblSearchCountry" runat="server" Text="Country:" meta:resourcekey="lblCountryResource1"></asp:Label>
                    </td>
                    <td style="vertical-align: top; text-align: left; width: 120px;">
                        <asp:TextBox ID="txtSearchCountry" runat="server" Width="120px"></asp:TextBox>&nbsp;
                    </td>
                    <td colspan="2" style="text-align: left;">
                        <asp:Button ID="btnSearch" runat="server" Text="Search" CausesValidation="false"
                            meta:resourcekey="btnSearch" OnClick="btnSearch_Click" />
                    </td>
                </tr>
                <tr>
                    <td style="vertical-align: top; text-align: right; width: 80px;">
                        <asp:Label ID="lblSearchEnglishName" runat="server" Text="English Name:" meta:resourcekey="lblCountryEngResource1"
                            Width="120px"></asp:Label>
                    </td>
                    <td style="vertical-align: top; text-align: left; width: 120px;">
                        <asp:TextBox ID="txtSearchEnglishName" runat="server" Width="120px"></asp:TextBox>
                    </td>
                    <td style="vertical-align: top; text-align: right">
                        <asp:Label ID="lblSearchChineseName" runat="server" Text="Chinese Name:" meta:resourcekey="lblCountryChiResource1"
                            Width="120px"></asp:Label>
                    </td>
                    <td style="vertical-align: top; text-align: left; width: 120px;">
                        <asp:TextBox ID="txtSearchChineseName" runat="server" Width="120px"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </fieldset>
    </asp:Panel>
    <table style="display: none;">
        <tr>
            <td align="center">
                <asp:Label ID="lblError" runat="server" ForeColor="Red" Width="100%" CssClass="error"
                    meta:resourcekey="lblErrorResource1"></asp:Label>
            </td>
        </tr>
    </table>
    <asp:Panel ID="GridPanel" runat="server" Height="400px" Width="100%" BorderWidth="1px"
        Visible="false" meta:resourcekey="GridPanelResource1">
        <asp:GridView CssClass="Grid" ID="GridView1" runat="server" AutoGenerateColumns="False"
            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
            CellPadding="3" CellSpacing="2" DataKeyNames="Country,EnglishName,ChineseName"
            DataSourceID="ODSCountries" EmptyDataText="No Country record(s) available." OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
            meta:resourcekey="GridView1Resource1" AllowPaging="True" PageSize="9" Width="100%"
            OnPageIndexChanging="GridView1_PageIndexChanging">
            <FooterStyle CssClass="GridFooterStyle" BackColor="#F7DFB5" ForeColor="#8C4510" />
            <Columns>
                <asp:ButtonField CommandName="Select" DataTextField="Country" HeaderText="Country"
                    SortExpression="Country" meta:resourcekey="ButtonFieldResource1">
                    <ItemStyle Width="200px" />
                </asp:ButtonField>
                <asp:BoundField DataField="Country" HeaderText="Country" ReadOnly="True" SortExpression="Country"
                    Visible="False" meta:resourcekey="BoundFieldResource1">
                    <ItemStyle Width="100px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="EnglishName" HeaderText="English Name" SortExpression="EnglishName"
                    meta:resourcekey="BoundFieldResource2">
                    <ItemStyle Width="200px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="ChineseName" HeaderText="Chinese Name" SortExpression="ChineseName"
                    meta:resourcekey="BoundFieldResource3">
                    <ItemStyle Width="200px" Wrap="False" />
                </asp:BoundField>
                <asp:CheckBoxField DataField="PCTYN" HeaderText="PCTYN" SortExpression="PCTYN" meta:resourcekey="CheckBoxFieldResource1">
                    <ItemStyle Width="80px" />
                </asp:CheckBoxField>
                <asp:BoundField DataField="CreateBy" HeaderText="CreateBy" SortExpression="CreateBy"
                    Visible="False" meta:resourcekey="BoundFieldResource4" />
                <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" SortExpression="CreateDate"
                    Visible="False" meta:resourcekey="BoundFieldResource5" />
                <asp:BoundField DataField="UpdateBy" HeaderText="UpdateBy" SortExpression="UpdateBy"
                    Visible="False" meta:resourcekey="BoundFieldResource6" />
                <asp:BoundField DataField="UpdateDate" HeaderText="UpdateDate" SortExpression="UpdateDate"
                    Visible="False" meta:resourcekey="BoundFieldResource7" />
                <asp:BoundField DataField="OwnerGroupID" HeaderText="OwnerGroupID" SortExpression="OwnerGroupID"
                    Visible="False" meta:resourcekey="BoundFieldResource8" />
            </Columns>
            <RowStyle CssClass="GridRowStyle" BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle CssClass="GridSelectedRowStyle" BackColor="#738A9C" Font-Bold="False"
                ForeColor="White" />
            <PagerStyle CssClass="GridPagerStyle" ForeColor="#8C4510" HorizontalAlign="Center" />
            <HeaderStyle CssClass="GridHeaderStyle" BackColor="DarkBlue" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
    </asp:Panel>
    <div style="padding-top: 10px; width: 970px;">
        <div style="padding: 5px">
            <fieldset style="text-align: center">
                <legend>
                    <asp:Label ID="lblCountryAdd" runat="server" Text="Edit Country" meta:resourcekey="lblRoleResource1"></asp:Label></legend>
                <table>
                    <tr>
                        <td style="vertical-align: top; width: 33%; text-align: right">
                            <asp:Label ID="lblCountry" runat="server" Text="Country" meta:resourcekey="lblCountryResource1"></asp:Label>
                        </td>
                        <td style="width: 211px; vertical-align: top; text-align: left;">
                            <asp:TextBox ID="txtCountry" runat="server" MaxLength="30" ReadOnly="true" CssClass="required"
                                meta:resourcekey="txtCountryResource1"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCountry"
                                Display="Dynamic" ErrorMessage="Country is a required field." meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 33%; text-align: right;">
                            <asp:Label ID="lblCountryEng" runat="server" Text="English Name" meta:resourcekey="lblCountryEngResource1"></asp:Label>
                        </td>
                        <td style="width: 211px; vertical-align: top; text-align: left;">
                            <asp:TextBox ID="txtCountryEng" runat="server" MaxLength="100" Width="331px" meta:resourcekey="txtCountryEngResource1"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 33%; text-align: right">
                            <asp:Label ID="lblCountryChi" runat="server" Text="Chinese Name" meta:resourcekey="lblCountryChiResource1"></asp:Label>
                        </td>
                        <td style="width: 211px; vertical-align: top; text-align: left;">
                            <asp:TextBox ID="txtCountryChi" runat="server" MaxLength="100" Width="331px" meta:resourcekey="txtCountryChiResource1"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 33%; text-align: right">
                        </td>
                        <td colspan="1" style="vertical-align: top; width: 211px; text-align: left">
                            <asp:CheckBox ID="chkPCTYN" runat="server" Text="PCT" meta:resourcekey="chkPCTYNResource1" />
                        </td>
                    </tr>
                </table>
                <table>
                    <tr>
                        <td colspan="2" style="text-align: center">
                            <div style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px">
                                <asp:Button ID="btnNew" runat="server" CausesValidation="False" CssClass="submit"
                                    Visible="false" OnClick="btnNew_Click" Text="New" meta:resourcekey="btnNewResource1" />
                                <asp:Button ID="btnModify" runat="server" CausesValidation="False" CssClass="submit"
                                    Visible="false" OnClick="btnModify_Click" Text="Edit" meta:resourcekey="btnModifyResource1" />
                                <asp:Button ID="btnSave" runat="server" CssClass="submit" OnClick="btnSave_Click"
                                    Text="Save" meta:resourcekey="btnSaveResource1" />
                                <asp:Button ID="btnDelete" runat="server" CausesValidation="False" CssClass="submit"
                                    OnClick="btnDelete_Click" Text="Delete" meta:resourcekey="btnDeleteResource1" />
                                <asp:Button ID="btnRestore" runat="server" Text="Restore" meta:resourcekey='btnRestore'
                                    OnClick="btnRestore_Click" CssClass="submit" CausesValidation="False" />
                                <asp:Button ID="btnCancel" runat="server" CssClass="reset" OnClick="btnCancel_Click"
                                    Text="Cancel" Visible="false" meta:resourcekey="btnCancelResource1" />
                                <asp:Button ID="btnBack" runat="server" CausesValidation="false" CssClass="reset"
                                    meta:resourcekey="btnBackResource1" Text="Back" OnClick="btnBack_Click" />
                            </div>
                        </td>
                    </tr>
                </table>
                <asp:CheckBox ID="chkForOperation" runat="server" Visible="False" meta:resourcekey="chkForOperationResource1" /><asp:CheckBox
                    ID="chkForUpdate" runat="server" Height="2px" Visible="False" Width="121px" meta:resourcekey="cbForUpdateResource1" /></fieldset>
        </div>
    </div>
    <table height="300">
        <tr>
            <td>
            </td>
        </tr>
    </table>
</asp:Content>
